import java.util.ArrayList;

public class List extends ArrayList<Node> {
	/**
	 * 
	 */
	private static final long serialVersionUID = -697312780325778067L;
	/**
	 * 
	 */
	private List list;

	public List(List list) {
		this.list = list;
	}

	public List() {
	}

	public int findElement(String element, List list) {
		int ret = 0;
		for (int i = 0; i < list.size(); i++) {
			if (element.equals(list.get(i).getElement())) {
				ret = i;
			}
		}
		return ret;
	}

	public boolean containElement(String element, List list) {
		boolean ret = false;
		for (int i = 0; i < list.size(); i++) {
			if (element.equals(list.get(i).getElement())) {
				ret = true;
			}
		}
		return ret;
	}

	public int index(String element, List list) {
		int index = 0;
		for (int i = 0; i < list.size(); i++) {
			if (element.equals(list.get(i).getElement())) {
				index = i;
			}
		}
		return index;
	}

	public void setList(List list) {
		this.list = list;
	}

	public List getList() {
		return list;
	}
}
